home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19990422-19990725 / 000033_news@watsun.cc.columbia.edu _Thu May 6 11:16:41 1999.msg < prev    next >
Internet Message Format  |  2020-01-01  |  2KB

  1. Return-Path: <news@watsun.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id LAA28546
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Thu, 6 May 1999 11:16:41 -0400 (EDT)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id LAA22211
  7.     for kermit.misc@watsun.cc.columbia.edu; Thu, 6 May 1999 11:04:43 -0400 (EDT)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  10. Subject: Re: if... input??
  11. Date: 6 May 1999 15:04:41 GMT
  12. Organization: Columbia University
  13. Message-ID: <7gsb29$lm0$1@newsmaster.cc.columbia.edu>
  14. To: kermit.misc@watsun.cc.columbia.edu
  15.  
  16. In article <926000750.668392@rosalyn.got.telia.se>,
  17. Per Berger <per.berger@home.se> wrote:
  18. : I've installed ckermit 7 on a FreeBSD box and it works fine. I've made a
  19. : script that telnet a host, run some commands and disconnects. Works great...
  20. : However, there is one problem. One of the commands generates a listing that
  21. : might give a "More" that needs a space to proceed.
  22. :
  23. Most commands that do this have a way to disable it.  If the host is UNIX,
  24. maybe you can work around it by redirecting the output, e.g.:
  25.  
  26.   command > /dev/tty
  27.  
  28. : I can always put that in
  29. : manually but I would like to have some sort of  "if input = "More" then send
  30. : space, if not proceed"
  31. As noted in the manual, this is what the MINPUT command is for; it looks for
  32. multiple targets at once.
  33.  
  34. First use "set terminal debug on" to see exactly what characters are in the
  35. command's More prompt and in your system prompt, for example:
  36.  
  37.   <carriage-return><linefeed>More?<space>
  38.  
  39. and:
  40.  
  41.   <carriage-return><linefeed>$<space>
  42.  
  43. Then do something like this:
  44.  
  45.   ouptut command\13   ; or, in C-Kermit 7.0 Beta.06, "lineout command"
  46.   set flag off
  47.   while not flag {
  48.       minput 10 {\13\10More? } {\13\10$ }
  49.       switch \v(minput) {
  50.         :1, output { }, break    ; Got more prompt - send a space
  51.         :2, set flag on, break   ; Got system prompt - done
  52.         :default, break
  53.       }
  54.   }
  55.  
  56. - Frank